import * as Engine from 'nunjucks';

const engine = function (engineConfig) {
    Engine.configure(engineConfig);
    return Engine;
}


export class Template{
    engine;
    templateRootPath: string;
    constructor(template_config){
        this.engine = engine(template_config.engine);
        this.templateRootPath = template_config.template.templateRootPath;
    }
    render(content, context){
        return this.engine.renderString(content, context);
    };
}